home *** CD-ROM | disk | FTP | other *** search
-
- 6. Creating projects from templates
-
-
-
- From the Information Manager, you have the option of
- creating a new project from existing files, from the
- Site Maker wizard, or from predefined templates, using
- the Template wizard. This chapter discusses using and
- configuring the Template wizard.
-
- 6.1. Creating a project
-
- To create a new project from one of several templates:
-
- * Choose New Project from the Information Manager File
- menu, and then choose From Template... from the sub-menu.
-
- The HoTMetaL PRO Template wizard is launched. This wizard
- guides you through the process of creating a new project.
- Descriptions of what you are creating appear below the
- choices you make in each screen.
-
- First, you are asked whether you want to create a new,
- blank project or create a project from the templates.
- If you choose New Project by clicking on the radio button,
- and then click on [Next >>], a new project with a blank
- document called index.htm is created, and the template
- wizard jumps directly to the screen that asks where
- you want to save the file.
-
- If you choose Templates by clicking on the radio button
- and click on [Next >>], the Templates screen appears,
- and you are prompted to choose from the following Categories:
-
- * Company Web Site -- Style 1
-
- * Company Web Site -- Style 2
-
- * Personal Web Site -- Style 1
-
- * Personal Web Site -- Style 2 (Animated)
-
- * Company Intranet
-
- A description of the new project templates appears in
- the Description section, and a graphic of the template's
- file structure appears on the right hand side of the
- dialog box. Select whichever option you want by clicking
- on the radio button, then click on [Next>>].
-
- These categories can be customized by editing the Template
- wizard configuration file (see Configuring the New
- Project wizard).
-
- Once you have chosen which template you want to base
- your project on and clicked on [Next>>], a dialog box
- appears, asking you where you would like your project
- to be created. Select the appropriate folder, click
- on [Finished], and your project templates will be copied
- to that location.
-
- The site will be opened as a new project in the Information
- Manager. You can now begin to edit the documents that
- were created from the template using the HoTMetaL PRO
- Editor in order to insert your own content.
-
- 6.2. Configuring the Site Template wizard
-
- After using the HoTMetaL PRO Information Manager for
- some time, you may want to configure the template wizard
- so that it generates the kind of sites that you use
- often. This section gives you instruction on how to
- do that.
-
- This wizard is configured by the file sitetmpl.hpt,
- which is located in the HoTMetaL PRO folder. You can
- modify this file if you want to use your own configuration
- for the new project wizard.
-
- The sitetmpl.hpt file is an SGML file conforming to
- the following DTD:
-
- <!ELEMENTáBODYá-á-á(CAT_INFO)+>
- <!ELEMENTáCAT_INFOáá-á-á(CAT_INFO)*>
- <!ATTLISTáCAT_INFO
- SHORTááááCDATAáá#REQUIREDáá
- LONGáááááCDATAáá#REQUIREDáá
- DIRááááááCDATAáá#IMPLIEDáá
- HOMEPAGEáCDATAá#REQUIREDáá
- IMGááááááCDATAáá#REQUIREDá>
-
- There is a sample at the end of this section. You can
- create this file with an SGML editor such as SoftQuad
- Author/Editor, or with a text editor. If you use a text
- editor, be careful to use the correct markup syntax.
-
- 6.3. Using the configuration file
-
- The functionality described in this topic is available
- in HoTMetaL PRO 4.0, but not in the Evaluation Version
- that you are now using. Choose `How To Purchase' in
- the Help menu for ordering information.
-
- An element called BODY (that is, the tags <BODY> and
- </BODY>) surrounds the contents of the file.
-
- Each template category in the Categories section of
- the template wizard's initial dialog box corresponds
- to a CAT_INFO element that is directly nested inside
- BODY.
-
- You can specify information about a template category
- using the attributes of the corresponding CAT_INFO element.
-
- If you are editing the sitetmpl.hpt with a text editor:
- the attributes are contained in the <CAT_INFO> start-tag,
- between the element name and the closing `>', as in
- the example below). Each attribute specification consists
- of an attribute name, assigned to a value enclosed in
- double quotes, using an equals sign. For example:
-
- SHORT="SampleáProjectsáandáTemplates"
-
- The attributes of CAT_INFO are used as follows:
-
- * SHORT - The label that appears in the Categories list
- in the template wizard dialog.
-
- * LONG - The long description of the template category
- in the template wizard dialog. The description can contain
- line breaks and blank lines.
-
- * DIR - The folder where the files that constitute this
- template are kept. When the template is opened, all
- of the files in this folder (and its subfolders) will
- be copied to the destination folder.
-
- * HOMEPAGE - The `index page' or starting point for
- the template files. This page is used as the index page
- when the Information Manager builds a project based
- on the chosen template.
-
- * IMG - An image representing the template, displayed
- on the right side of the template wizard dialog box.
-
- The DIR, HOMEPAGE, and IMG can be specified with absolute
- or relative paths, but not with URLs. A relative path
- for DIR or IMG is relative to the HoTMetaL PRO folder;
- a relative path for HOMEPAGE is relative to the DIR
- location.
-
- Each template category can have an arbitrary number
- of levels of sub-categories. Sub-categories are displayed
- in the template wizard by choosing a category and then
- clicking on the [Next>>] button in the initial dialog
- box. If a template category has no sub-categories (that
- is, the corresponding CAT_INFO has no nested CAT_INFOs),
- clicking on [Next>>] displays a dialog for choosing
- the destination folder, into which the chosen template
- and its auxiliary files will be copied.
-
- To give a category one or more sub-categories:
-
- * Nest one or more CAT_INFO elements inside the CAT_INFO
- element corresponding to the current category.
-
- * Delete the DIR attribute value in the current category's
- CAT_INFO element.
-
- * Configure the sub-category by setting its attribute
- values as described above.
-
- 6.4. Sample configuration file
-
- The functionality described in this topic is available
- in HoTMetaL PRO 4.0, but not in the Evaluation Version
- that you are now using. Choose `How To Purchase' in
- the Help menu for ordering information.
-
- Here is a sample sitetmpl.hpt file that defines one
- category with three sub-categories.
- <BODY>
- <CAT_INFOáSHORT="SampleáProjectsáandáTemplates"
- LONG="CollectionsáofáHTMLádocumentsádesignedátoábeáusedáas
- templatesáinácreatingáaácorporateáintranet."
- IMG="template\core\filelist.bmp">
-
- <CAT_INFOáSHORT="CorporateáPages"
- LONG="Corporateáhomepageáandáotherácompany-wideádocuments."
- DIR="template\core\"
- HOMEPAGE="index.htm"
- IMG="template\core\corp.bmp">
- </CAT_INFO>
-
- <CAT_INFOáSHORT="SampleáHRáDepartment"
- LONG="HRáHomepageáandáassociatedáprojects.áIncludes
- workgroupápagesáplusáHRádepartmentádocuments."
- DIR="template\humanres\"
- HOMEPAGE="index.htm"
- IMG="template\core\hr.bmp"áhomePage="index.htm">
- </CAT_INFO>
-
- <CAT_INFOáSHORT="SampleáFinanceáDepartment"
- LONG="FinanceáHomepageáandáassociatedáprojects.ááIncludes
- workgroupápagesáplusáFinanceádepartmentádocuments."
- DIR="template\account\"
- HOMEPAGE="index.htm"
- IMG="template\core\account.bmp">
- </CAT_INFO>
-
- </CAT_INFO>
- </BODY>
-
-